<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<jsp:include page="/WEB-INF/views/commons/center_top.jsp"/>
<script type="text/javascript" src="/static/module/commons/public.js"></script>

<div class="contBox clear">
	<div class="col-xs-12 no-padding">
		<div class="col-xs-6 no-padding">			
			<div class="widget-box">
				<div class="widget-header header-color-blue">
					<span>数据字典</span>
					<div class="widget-toolbar no-border">
						<div class="btn-group">
							<button id="add_grid-table" class="btn btn-info btn-sm" onclick="addDict()" ><span class="icon-plus-sign"></span>添加</button>
							<button id="edit_grid-table" class="btn btn-info btn-sm" onclick="editDict()"><span class="icon-plus-sign"></span>编辑</button>
							<button id="del_grid-table" class="btn btn-info btn-sm" onclick="deleteDict()"><span class="icon-plus-sign"></span>删除</button>
							<button id="view_grid-table" class="btn btn-info btn-sm" onclick="showType()"><span class="icon-pencil"></span>管理字典类型</button>
						</div>
					</div>
				</div>
				<div class="widget-body overflow">
					<table id="grid-table"></table>
					<div id="grid-pager"></div>
				</div>
			</div>
	 	</div>
	 	
	 	<!-- 字典类型 panel -->
	 	<div id="dctype_panel" class="col-xs-6 no-padding-right" style="display: none" >
			<div class="widget-box">
				<div class="widget-header header-color-blue">
					<span>字典类型</span>
					<div class="widget-toolbar no-border">
						<div class="btn-group">
							<button id="add_grid-table" class="btn btn-info btn-sm" onclick="addDctype()" ><span class="icon-plus-sign"></span>添加</button>
							<button id="edit_grid-table" class="btn btn-info btn-sm" onclick="editDctype()"><span class="icon-pencil"></span>编辑</button>
							<button id="del_grid-table" class="btn btn-info btn-sm" onclick="deleteDctype()"><span class="icon-trash"></span>删除</button>
						</div>
					</div>
				</div>
				<div class="widget-body">
					<table id="grid-dctype" ></table>
				</div>
			</div>
	 	</div>
	 	
	 	<!-- 字典编辑 panel -->
	 	<div id="dict_panel" class="col-xs-6 no-padding-right" style="display: none;">
			<div class="widget-box">
			 	<div class="widget-header header-color-blue">
			 		<span class="title">字典编辑</span>
					<div class="widget-toolbar no-border">
						<div class="btn-group">
							<button class="btn btn-info btn-sm ifshow" onclick="doSaveDict()"  id="roleSave">
								<i class="icon-save bigger-150"></i>
								保存
							</button>
						</div>
					</div>
				</div>
			 	<div class="widget-body">
			 	<div class="widget-main padding-8">
				<div class="clear tree-unselectable">
				 	<form name="dictform" id="dictform" class="FormGrid"   >
						<input type="hidden"  name="id" id="form_dict_id" />
						<div class="form-group col-sm-12">
							<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 字典名称 </label>
							<div class="col-sm-10">
								<input name="name" id="form_dict_name" class="col-xs-10 col-sm-9 required" type="text" >
							</div>
						</div>
						<div class="form-group col-sm-12">
							<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 字典编码 </label>
							<div class="col-sm-10">
								<input name="code" id="form_dict_code" class="col-xs-10 col-sm-9 required" type="text" >
							</div>
						</div>
					</form>
				</div>
				</div>
				</div>
			</div>
	 	</div>
 	</div>
 	
	
	<!--添加类型 -->
	<div id="dctypeinfo" class="dictinfo hide">
	<div class="ui-jqdialog-content ui-widget-content" >
		<form name="dctypeform" id="dctypeform" class="FormGrid"   style="width:auto;overflow:auto;position:relative;height:auto;">
			<input type="hidden"  name="parentId" id="form_dctype_parent_id" />
			<input type="hidden"  name="id" id="form_dctype_dict_id" >
			<table id="TblGrid_grid-table" class="EditTable" cellspacing="0" cellpadding="0" border="0">
				<tbody>
					<tr id="FormError" style="display:none">
						<td class="ui-state-error" colspan="2">
						</td>
					</tr> 
					<tr rowpos="1" class="FormData" id="tr_id">
						<td class="CaptionTD"> 所属字典 </td>
						<td class="DataTD"> &nbsp;
							<input type="text" id="form_dict_text" readonly="readonly" role="textbox" class="form_dict_name FormElement ui-widget-content ui-corner-all">
						</td>
					</tr>
					<tr rowpos="1" class="FormData" id="tr_id">
						<td class="CaptionTD"> 类型名称 </td>
						<td class="DataTD"> &nbsp;
							<input type="text"  name="name" id="form_dctype_dict_name"  role="textbox" class="form_dict_name FormElement ui-widget-content ui-corner-all required">
						</td>
					</tr>
					<tr rowpos="2" class="FormData" id="tr_name">
						<td class="CaptionTD"> 类型编码 </td>
						<td class="DataTD"> &nbsp;
							<input type="text" name="code" id="form_dctype_dict_code" role="textbox" class="FormElement ui-widget-content ui-corner-all required">
						</td>
					</tr>
				</tbody>
			</table>
		</form>
		<table border="0" cellspacing="0" cellpadding="0" class="EditTable" id="TblGrid_grid-table_2">
			<tbody>
				<tr> <td colspan="2"> <hr class="ui-widget-content" style="margin:1px"> </td> </tr>
				<tr id="Act_Buttons">
					<td class="EditButton">
						<a href="javascript:doSaveDctype()" id="sData" class="fm-button ui-state-default ui-corner-all fm-button-icon-left btn btn-sm btn-primary">
							<i class="icon-ok"> </i> 提交
						</a>
						<a href="javascript:RM.close()" id="cData" class="fm-button ui-state-default ui-corner-all fm-button-icon-left btn btn-sm">
							<i class="icon-remove"> </i> 取消
						</a>
					</td>
				</tr>
				<tr style="display:none" class="binfo">
					<td class="bottominfo" colspan="2"> </td>
				</tr>
			</tbody>
		</table>
	</div>
	</div>
</div>
<script type="text/javascript" src="/static/module/system/dict/index.js"></script>
<jsp:include page="/WEB-INF/views/commons/center_bottom.jsp"/>